using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;

namespace ibba.src.norisk.page
{
    public partial class PageDefault : Page
    {
        public PageDefault()
        {
            InitializeComponent();
            App.MainPage.barraMenu.ClearButtons();

            if (PerfilHelper.IsBackOffice && !PerfilHelper.IsConsulta)
            {
                //btnContrato.Visibility = System.Windows.Visibility.Collapsed;
                btnProdutoModalidade.Visibility = System.Windows.Visibility.Collapsed;
                btnGarantiaContrato.Visibility = System.Windows.Visibility.Collapsed;
                btnParesIndexadores.Visibility = System.Windows.Visibility.Collapsed;
                btnTetoMitigacao.Visibility = System.Windows.Visibility.Collapsed;
                btnRelatorios.Visibility = System.Windows.Visibility.Collapsed;
                btnDeParaTipoLimite.Visibility = System.Windows.Visibility.Collapsed;
                btnImportacaoGarantiasLote.Visibility = System.Windows.Visibility.Collapsed;
            }
        }

        // Executes when the user navigates to this page.
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }

        private void Botao_Click(object sender, RoutedEventArgs e)
        {

            string lnk = (sender as slcomponentes.CustomButtonBar).Tag.ToString();
            App.MainPage.NavigateTo(lnk);

        }
    }
}
